import request from '../config/request.js'
// import { useBaseStore } from "../stores/useBaseStore.js";
// let baseStore = useBaseStore();

export const login = function (params = {}) {
  return request({
    url: '/api/v1/login',
    method: 'post',
    // 请求体参数 data 属性
    data: params,
  })
}

export const loadUserMenus = function () {
  return request({
    url: '/api/v1/menus',
    method: 'get',
    // 自定义请求头
    // headers: {
    //     Authorization:"Bearer "+baseStore.token
    // },
  })
}

export const loadPublicTeacher = function(teacher_name=""){
  return request({
    url:"/api/v1/auth/teacher",
    method:"get",
    params:{
      teacher_name:teacher_name
    }
  })
}

